package com.shop.cereshop.commons.domain.wallet;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * <p>
 * 实体类
 * 代理商钱包表
 * </p>
 *
 * @since 2025-11-14
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@TableName("cere_agent_wallet")
@ApiModel(value = "CereAgentWallet", description = "代理商钱包表")
@AllArgsConstructor
@Builder
public class CereAgentWallet {

  private static final long serialVersionUID = 1L;

  /**
   * 钱包ID
   */
  @ApiModelProperty(value = "钱包ID")
  @NotNull(message = "钱包ID不能为空")
  @TableId(value = "wallet_id", type = IdType.AUTO)
  private Long walletId;

  /**
   * 代理商ID
   */
  @ApiModelProperty(value = "代理商ID")
  @NotNull(message = "代理商ID不能为空")
  @TableField("agent_user_id")
  private Long agentUserId;

  /**
   * 可用余额
   */
  @ApiModelProperty(value = "可用余额")
  @NotNull(message = "可用余额不能为空")
  @TableField("balance")
  private BigDecimal balance;

  /**
   * 冻结余额
   */
  @ApiModelProperty(value = "冻结余额")
  @NotNull(message = "冻结余额不能为空")
  @TableField("frozen_balance")
  private BigDecimal frozenBalance;

  /**
   * 创建时间
   */
  @ApiModelProperty(value = "创建时间")
  @NotNull(message = "创建时间不能为空")
  @TableField("create_time")
  private LocalDateTime createTime;

  /**
   * 更新时间
   */
  @ApiModelProperty(value = "更新时间")
  @NotNull(message = "更新时间不能为空")
  @TableField("update_time")
  private LocalDateTime updateTime;

  /**
   * 角色类型（1-代理商，2-业务员）
   */
  @ApiModelProperty(value = "角色类型（1-代理商，2-业务员）")
  @NotNull(message = "角色类型不能为空")
  @TableField("role_type")
  private Integer roleType;

}
